package java8;

import java.util.Arrays;
import java.util.List;

public class MethodReferenceTest1 {
    int a;
    public MethodReferenceTest1(int a) {
        this.a = a;
    }

    public void fun() {
        System.out.println(a);
    }


    public static void main(String[] args) {
        List<MethodReferenceTest1> list = Arrays.asList(new MethodReferenceTest1(5));
        list.forEach(MethodReferenceTest1::fun);
    }
}
